<!DOCTYPE html>
<html>
    <head lang="en">
        <meta charset="UTF-8">
        <meta name="csrf-token" content="{{ csrf_token() }}">
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">	
        <link rel="shortcut icon" type="image/x-icon" href="{{URL::asset('handan/images/logo-icon.png')}}" />
        <title>分析师</title>
        <link rel="stylesheet" href="{{URL::asset('mobile/css/public.css') }}"/>
        <link rel="stylesheet" href="{{URL::asset('newmobile/css/jyXIngWei.css') }}"/>
        <script src="{{URL::asset('mobile/js/public.js') }}"></script>
        <script src="{{URL::asset('public_js/jquery-3.2.1.min.js')}}"></script>
        <script src="{{ URL::asset('public_js/src/echarts.js') }}"></script>
        <script src="{{ URL::asset('public_js/src/Highcharts-5.0.10/code/highcharts.js') }}"></script>
		<script src="{{ URL::asset('public_js/src/Highcharts-5.0.10/code/highcharts-3d.js')}}"></script>
		<script src="{{ URL::asset('public_js/src/Highcharts-5.0.10/code/highcharts-zh_CN.js')}}"></script>
		<script src="{{ URL::asset('public_js/src/Highcharts-5.0.10/code/modules/exporting.js') }}"></script>
		<script src="{{ URL::asset('public_js/src/Highcharts-5.0.10/code/highcharts-more.js') }}"></script>
		<script src="{{ URL::asset('public_js/src/Highcharts-5.0.10/code/modules/solid-gauge.js') }}"></script>
		<script src="{{URL::asset('newmobile/js/jyXingWei.js') }}"></script>
    </head>
<body>
@include('newmobile.title')	
<!-- 盈亏图  Start -->
<div class="yingkui">
	<div class="jxc_title">
		盈亏图
	</div>
	<div style="width: 100%;height: 100%;" id="week_chart"></div>
</div>
<!-- 盈亏图  end -->
<!-- 交易品种 start -->
<div class="yingkui" style="height: 8.5rem;margin:0.21333333333333335rem 0rem;">
	<div class="jxc_title">
		交易品种
	</div>
	<div style="width: 100%;height: 100%;" id="trade_type"></div>
</div>
<!-- 交易品种 end --> 
<!-- 擅长品种 Start -->
<div class="yingkui" style="height:auto;margin:0.21333333333333335rem 0rem;">
	<div class="jxc_title">
		擅长品种
	</div>
	@if($memadepttype)
		@foreach($memadepttype as $mkey=>$mval)
			<div class="scpz">
				<div>
					<span>{{$mval->chinaname}}<span>{{$mval->typename}}</span></span>
					<span>{{$mval->ordernum}}单</span>
					<span>{{$mval->point}}点</span>
				</div>
			</div>
		@endforeach
	@endif
</div>
<!-- 擅长品种 end -->
<!-- 下单时间  start-->
<div class="yingkui" style="height: 11.733333333333333rem;margin:0.21333333333333335rem 0rem;">
	<div class="jxc_title">
		下单时间
	</div>
	<div style="width: 100%;height: 5.333333333333333rem;" id="timeFBchart"></div>
	<div class="scpz">
		<div>
			<span class="xdDx">短线</span>
			<span class="xdBs">{{ $lastPoint->shortLine }}笔</span>
			<span class="xdDl">盈利单量<b style="color: #cbdde9;">{{$lastPoint->shortProfitaNum}}笔</b></span>
			<span class="xdFont">
				占 @if($lastPoint->shortLine !=0)
					{{round(($lastPoint->shortProfitaNum / $lastPoint->shortLine*100),2)}}
				@else
					0
				@endif %</span>
		</div>
	</div>
	<div class="scpz">
		<div>
			<span class="xdDx">中线</span>
			<span class="xdBs">{{$lastPoint->centerLine}}笔</span>
			<span class="xdDl">盈利单量<b style="color: #cbdde9;">{{$lastPoint->centerProfitNum}}笔</b></span>
			<span class="xdFont">
				占 @if($lastPoint->centerLine !=0)
					{{round(($lastPoint->centerProfitNum / $lastPoint->centerLine*100),2)}}
				@else
					0
				@endif %</span>
		</div>
	</div>
	<div class="scpz">
		<div>
			<span class="xdDx">长线</span>
			<span class="xdBs">{{$lastPoint->longLine}}笔</span>
			<span class="xdDl">盈利单量<b style="color: #cbdde9;">{{$lastPoint->longProfitNum}}笔</b></span>
			<span class="xdFont">
				占 @if($lastPoint->longLine !=0)
					{{round(($lastPoint->longProfitNum / $lastPoint->longLine*100),2)}}
				@else
					0
				@endif %</span>
		</div>
	</div>
</div>
<!-- 下单时间  end -->
<!-- 点位区间 start -->
<div class="yingkui" style="margin:0.21333333333333335rem 0rem;">
	<div class="jxc_title">
		点位区间
	</div>
	<div style="width: 100%;height:7.466666666666667rem;" id="L_YSchart"></div>
</div>
<!-- 点位区间 end -->
<div style="height: 3rem;"></div>
<!-- 订阅 Start -->
@if($followstatus != 2)
	@if($followstatus == 1)
		<div class="dyJxc" onclick="xwfollow({{$id}})" style="background: #3e5565;">编辑订阅</div>
	@else
		<div class="dyJxc" onclick="xwfollow({{$id}})">订阅</div>
	@endif
@endif
<!-- 订阅 end -->
@include('mobile.msg')
@include('newmobile.tanchuang')
</body>
</html>
<style>
body section.title div:nth-child(1) ,body section.title div:nth-child(3){
  border-bottom: 0rem solid #3B9CE0;
  color: #9592A7;
}
body section.title div:nth-child(2) {
  border-bottom: 0.1rem solid #3B9CE0;
  color: #FFFFFF;
}
</style>
<script>
	var userId = 0;
	function xwfollow(userid){
        if('{{$followstatus}}' == 1){
            $('#gendancancle').show();
        }else{
            $('#gendancancle').hide();
        }
		$('#follow_btn').show();
		userId = userid;
	}
	$(function(){
		//交易品种饼图数据
		var dataP ="[{{$typenamestr}}]";
		dataP = dataP.replace(/&#039;/g,'"').replace(/&quot;/g,'"');
		dataP = $.parseJSON(dataP);
		drawChartB("trade_type",dataP);
		// 盈亏图
		var week_chart_width ;
		week_chart_width = $('#week_chart').width();
		var YK_finalstr  = '{{$plpointstr}}',
			YK_setProfilestr = '{{$profitpointstr}}',
			YK_setLossstr    = '{{$losspointstr}}',
			YK_timestr       = '{{$pltimestr}}',
			YK_finalData  = [],
			YK_setProfile = [],
			YK_setLoss    = [],
			YK_time       = [];
		YK_finalData  = dataFn(YK_finalstr,2);
		YK_setProfile = dataFn(YK_setProfilestr,2);
		YK_setLoss    = dataFn(YK_setLossstr,2);
		YK_time       = dataFn(YK_timestr,1);
		YKprofit('week_chart',YK_finalData,YK_setProfile,YK_setLoss,YK_time,week_chart_width);
		//下单时间分布
		var L_timeFBchart_w;
		L_timeFBchart_w = $('#timeFBchart').width();
		var delpointstr = '{{$delpointstr}}',
				deltimetstr = '{{$deltimetstr}}',
				delwinratestr = '{{$delwinratestr}}';
		var data7day = [delpointstr.split(','),deltimetstr.split(','),delwinratestr.split(',')];
		timeFBreport('timeFBchart',data7day,L_timeFBchart_w);
		// 点位区间
		var L_YSchart_w,L_YSchart_h;
		L_YSchart_w = $('#L_YSchart').width();
		L_YSchart_h = $('#L_YSchart').height();
		var yingLiNum = [],
			kuiSunNum = [],
			yingKuiBiNum = [];
		var yingLiStr = '{{$pointBetweenChat[0]}}';
		var kuiSunStr = '{{$pointBetweenChat[1]}}';
		var yingKuiBiStr = '{{$pointBetweenChat[2]}}';

		yingLiNum = dataFn(yingLiStr,2);
		kuiSunNum = dataFn(kuiSunStr,2);
		yingKuiBiNum = dataFn(yingKuiBiStr,2);
		var dataYS = [yingLiNum,kuiSunNum,yingKuiBiNum];
		YSreport('L_YSchart',dataYS,L_YSchart_w,L_YSchart_h);
	})
</script>
